<template>
  <a-badge v-bind="attrs" />
</template>

<script setup lang="ts">
const props = defineProps<{
  status: 1 | 0
}>()
const STATUS_MAP = {
  1: {
    color: 'green',
    text: '启用'
  },
  0: {
    color: 'red',
    text: '禁用'
  }
}
const attrs = $computed(() => {
  return STATUS_MAP[props.status]
})
</script>

<style lang="less"></style>